package org.vergil.core.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Created by vergil on 17-3-15.
 */
@Service
public class TestForCacheMap {


    @Autowired
    private CacheManager cacheManager;

    @Cacheable(cacheNames = "test",keyGenerator ="myKeyGenerator")
    public String save(Map<String, Object> map){
        return "test";
    }


    @Cacheable(cacheNames = "test", keyGenerator = "myKeyGenerator")
    public String update(Map<String, Object> map){
        return "test";
    }
}
